package cn.usian.mapper;

import cn.usian.entity.Dish;
import cn.usian.entity.DishDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface DishMapper extends BaseMapper<Dish> {

//    @Select("select c.name categoryName,d.* from category c,dish d where c.id=d.category_id")

    Page<DishDto> findPage(Page<Dish> page1, @Param("name") String name);
    @Select("select id from dish where name=#{name}")
    Long selectByName(String name);

    void selectAll(long[] categotyId);
}
